package com.dolphin.apiboss.controller;

import com.dolphin.apiboss.service.DriverCarBindingRelationshipService;
import com.dolphin.common.dto.DriverCarBindingRelationship;
import com.dolphin.common.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(("/driver-car-binding-relationship"))
public class DriverCarBindingRelationshipController {

    @Autowired
    private DriverCarBindingRelationshipService driverCarBindingRelationshipService;
    @PostMapping("/bind")
    public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship){

        return driverCarBindingRelationshipService.bind(driverCarBindingRelationship);

    }
    @PostMapping("/unbind")
    public ResponseResult ubbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelations){


        return driverCarBindingRelationshipService.unbind(driverCarBindingRelations);
    }

}
